#ifndef FILTROVENTANA_H
#define FILTROVENTANA_H

#endif // FILTROVENTANA_H

#include <QtGui>
#include "ui_filtroVentana.h"
#include "Graficas2D.h"
#include "filtroSpinItem.h"
#include "filtroVentanaNuevo.h"
class FiltroVentana : public QMainWindow
{
	Q_OBJECT

public:
	FiltroVentana(QWidget *parent = 0);
	~FiltroVentana();
	void getKernel(double * kernel);
	void getKernelSize(int& f, int& c);
	bool isSeparable();

private:
	Ui::FiltroVentanaClass ui;

	FiltroVentanaNuevo filtroVentana;

	bool separable;

	QStandardItemModel model;
	QStandardItemModel model2;

	FiltroSpinItem delegate;
	QDirModel fileModel;
	QModelIndex raiz;
	void setSeparable(bool separable);
	void writeModel(QDataStream &out, QStandardItemModel &model);
	void readModel(QDataStream & in, QStandardItemModel& model, int row, int col);
private slots:
	void changeRowSize(int row);
	void changeColSize(int col);
	bool checkFiltro();
	void save();
	void read();
	void read(const QString & fileName);
	void fileClick(const QModelIndex & index);
	void slotAplicar();
	void nuevo();
	void changeSize(int row, int col);
signals:
	void signalAplicar();
};
